home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
Str
/
c
/
MakeASCIIZ
< prev
next >
Wrap
Text File
|
1995-07-08
|
939b
|
30 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: Str.MakeASCIIZ.c
Author: Copyright © 1994 Tim Browse
Version: 1.00 (06 Mar 1994)
Purpose: Convert a CR-terminated string to be 0-terminated (ASCIIZ).
*/
#include "DeskLib:Str.h"
void Str_MakeASCIIZ(char *s, int max_len)
{
int i = 0;
while ((i < max_len) && (s[i] > 31))
i++;
if (i < max_len)
s[i] = '\0'; /* Null terminate it */
}